package com.example.onlineeducation.mapper

import com.example.onlineeducation.data.json.OfflineExamListJson
import com.example.onlineeducation.data.model.OfflineExamListDataModel
import com.yc.jetpacklib.extension.ycToNoEmpty

import com.yc.jetpacklib.mapper.IMapper

/*
* 线下考试列表
* */
class OfflineExamListMapper: IMapper<OfflineExamListJson, OfflineExamListDataModel> {
    override fun map(input: OfflineExamListJson): OfflineExamListDataModel = OfflineExamListDataModel(
        input.id,
        input.name.ycToNoEmpty(),
        input.examImage.ycToNoEmpty(),
        input.topicId,
        input.topicName.ycToNoEmpty(),
        input.beginTime,
        input.endTime,
        input.totalScore.ycToNoEmpty("0"),
    )
}
